# vim:fileencoding=utf-8:foldmethod=marker

#: Miscellaneous {{{

#: Show documentation

# map kitty_mod+f1 show_kitty_doc overview

#: Toggle fullscreen

# map kitty_mod+f11 toggle_fullscreen
# map ctrl+cmd+f    toggle_fullscreen

#: Toggle maximized

# map kitty_mod+f10 toggle_maximized

#: Toggle macOS secure keyboard entry

# map opt+cmd+s toggle_macos_secure_keyboard_entry

#: Unicode input

# map kitty_mod+u    kitten unicode_input
# map ctrl+cmd+space kitten unicode_input

#: Edit config file

# map kitty_mod+f2 edit_config_file
# map cmd+,        edit_config_file

#: Open the kitty command shell

# map kitty_mod+escape kitty_shell window

#::  Open the kitty shell in a new window / tab / overlay / os_window
#::  to control kitty using commands.

#: Increase background opacity

# map kitty_mod+a>m set_background_opacity +0.1

#: Decrease background opacity

# map kitty_mod+a>l set_background_opacity -0.1

#: Make background fully opaque

# map kitty_mod+a>1 set_background_opacity 1

#: Reset background opacity

# map kitty_mod+a>d set_background_opacity default

#: Reset the terminal

# map kitty_mod+delete clear_terminal reset active
# map opt+cmd+r        clear_terminal reset active

#::  You can create shortcuts to clear/reset the terminal. For
#::  example::

#::      # Reset the terminal
#::      map f1 clear_terminal reset active
#::      # Clear the terminal screen by erasing all contents
#::      map f1 clear_terminal clear active
#::      # Clear the terminal scrollback by erasing it
#::      map f1 clear_terminal scrollback active
#::      # Scroll the contents of the screen into the scrollback
#::      map f1 clear_terminal scroll active
#::      # Clear everything up to the line with the cursor
#::      map f1 clear_terminal to_cursor active

#::  If you want to operate on all kitty windows instead of just the
#::  current one, use all instead of active.

#::  It is also possible to remap Ctrl+L to both scroll the current
#::  screen contents into the scrollback buffer and clear the screen,
#::  instead of just clearing the screen, for example, for ZSH add the
#::  following to ~/.zshrc:

#::  .. code-block:: zsh

#::      scroll-and-clear-screen() {
#::          printf '\n%.0s' {1..$LINES}
#::          zle clear-screen
#::      }
#::      zle -N scroll-and-clear-screen
#::      bindkey '^l' scroll-and-clear-screen

#: Clear up to cursor line

# map cmd+k clear_terminal to_cursor active

#: Reload kitty.conf

# map kitty_mod+f5 load_config_file
# map ctrl+cmd+,   load_config_file

#::  Reload kitty.conf, applying any changes since the last time it
#::  was loaded. Note that a handful of options cannot be dynamically
#::  changed and require a full restart of kitty. Particularly, when
#::  changing shortcuts for actions located on the macOS global menu
#::  bar, a full restart is needed. You can also map a keybinding to
#::  load a different config file, for example::

#::      map f5 load_config /path/to/alternative/kitty.conf

#::  Note that all options from the original kitty.conf are discarded,
#::  in other words the new configuration *replace* the old ones.

#: Debug kitty configuration

# map kitty_mod+f6 debug_config
# map opt+cmd+,    debug_config

#::  Show details about exactly what configuration kitty is running
#::  with and its host environment. Useful for debugging issues.

#: Send arbitrary text on key presses

#::  E.g. map ctrl+shift+alt+h send_text all Hello World

#::  You can tell kitty to send arbitrary (UTF-8) encoded text to the
#::  client program when pressing specified shortcut keys. For
#::  example::

#::      map ctrl+alt+a send_text all Special text

#::  This will send "Special text" when you press the Ctrl+Alt+A key
#::  combination. The text to be sent decodes ANSI C escapes
#::  <https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-
#::  Quoting.html> so you can use escapes like \e to send control
#::  codes or \u21fb to send Unicode characters (or you can just input
#::  the Unicode characters directly as UTF-8 text). You can use
#::  `kitty +kitten show_key` to get the key escape codes you want to
#::  emulate.

#::  The first argument to send_text is the keyboard modes in which to
#::  activate the shortcut. The possible values are normal,
#::  application, kitty or a comma separated combination of them. The
#::  modes normal and application refer to the DECCKM cursor key mode
#::  for terminals, and kitty refers to the kitty extended keyboard
#::  protocol. The special value all means all of them.

#::  Some more examples::

#::      # Output a word and move the cursor to the start of the line (like typing and pressing Home)
#::      map ctrl+alt+a send_text normal Word\e[H
#::      map ctrl+alt+a send_text application Word\eOH
#::      # Run a command at a shell prompt (like typing the command and pressing Enter)
#::      map ctrl+alt+a send_text normal,application some command with arguments\r

#: Open kitty Website

# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/

#: Hide macOS kitty application

# map cmd+h hide_macos_app

#: Hide macOS other applications

# map opt+cmd+h hide_macos_other_apps

#: Minimize macOS window

# map cmd+m minimize_macos_window

#: Quit kitty

# map cmd+q quit

#: }}}
